/**
 * 单张大图及相关结构化信息显示
 * Created by Chenms on 2017/3/27.
 */
var onePicInfoShow = function () {
    return {
        init: function () {

        },
        /**
         * 车要素ID:ssid,图片宽度:width,图片高度:height,调用字段:field,类型:type,是否为原始图片:original,是否画框:rect
         * 显示单张小图,原始必然划线，缩略图不划线，图片大小不传为默认大小
         * 车要素ID：ssid,
         * 调用字段：field,STORAGE_URL3 远景照片(全景相机所拍照片),STORAGE_URL1 近景照片;PANORAMA_PHOTOS 人员大图,PERSON_PHOTOS 人员小图
         * 类型：type,MOTOR_VEHICLE为车辆,PERSON为人员，NON_MOTOR_VEHICLE为非机动车
         * 是否为原始图片：original,0否,1为是,默认为原始
         * 是否画框rect：0不画,1画,默认画框
         * 图片宽度：width
         * 图片高度：height
         * 	var picPropertity={		ssid:"id",
									field:"STORAGE_URL1",
									type:"MOTOR_VEHICLE",
									original:"0",
									rect:"0",
									width:"0",
									height:"0"};
         var URL=onePicInfoShow.picAddress(picPropertity);
         */
        picAddress: function (picPropertity) {
            var picUrl = "";
            if (picPropertity.hasOwnProperty("ssid") && picPropertity.hasOwnProperty("field") && picPropertity && picPropertity.hasOwnProperty("type")) {
                picPropertity = {
                    ssid: (picPropertity && picPropertity.hasOwnProperty("ssid")) ? picPropertity.ssid : false,
                    field: (picPropertity && picPropertity.hasOwnProperty("field")) ? picPropertity.field : false,
                    type: (picPropertity && picPropertity.hasOwnProperty("type")) ? picPropertity.type : false,
                    original: (picPropertity && picPropertity.hasOwnProperty("original")) ? picPropertity.original : 1,
                    rect: (picPropertity && picPropertity.hasOwnProperty("rect")) ? picPropertity.rect : 0,
                    width: (picPropertity && picPropertity.hasOwnProperty("width")) ? picPropertity.width : 0,
                    height: (picPropertity && picPropertity.hasOwnProperty("height")) ? picPropertity.height : 0
                };
                // picUrl += picServiceIp + "ssid=" + picPropertity["ssid"] + "&field=" + picPropertity["field"] + "&type=" + picPropertity["type"]
                //     + "&original=" + picPropertity["original"] + "&rect=" + picPropertity["rect"] + "&w=" + picPropertity["width"] + "&h=" + picPropertity["height"];
                 picUrl += picServiceIp + "ssid=" + picPropertity["ssid"] + "&field=STORAGE_URL1" + "&type=" + picPropertity["type"]
                    + "&original=" + picPropertity["original"] + "&rect=" + picPropertity["rect"] + "&w=" + picPropertity["width"] + "&h=" + picPropertity["height"];
            } else {
                //return $.notification.warning({ text: '暂无图片！', timeout: 1000, layout: 'center' });
            }
            return picUrl;
        }
    };
}();
onePicInfoShow.init();
